﻿package config;

import config.poker.PokerConfig;
import util.KPrintInfo;

public class ConfigInit {
	static private ConfigInit	configInit	= new ConfigInit();
	
	static public ConfigInit getInstance() {
		return configInit;
	}
	
	public void init() {
		initSysConfig();
		initServer();
		initLogin();
		initChat();
		initPoker();
		
		initMap();
	}
	
	private void initMap() {
		MapConfig.getInstance().init();
	}
	
	public void initServer() {
		ServerConfig.getInstance().init();
	}
	
	private void initLogin() {
		LoginConfig.getInstance().init();
	}
	
	private void initChat() {
		ChatConfig.getInstance().init();
	}
	
	private void initPoker() {
		PokerConfig.getInstance().init();
	}
	
	private void initSysConfig() {
		if (SystemDefine.getInstance().loadConfing()) {
			KPrintInfo.println("-------加载配置文件成功-----");
		} else {
			KPrintInfo.println("---------加载配置文件失败-----------");
			return;
		}
	}
	
	// end class
}
